home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14665 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  35 lines

  1. Newsgroups: comp.object,comp.lang.eiffel,comp.lang.c++,comp.lang.beta,comp.lang.java,comp.lang.sather
  2. Path: newsfeed.acns.nwu.edu!ftpbox!mothost!schbbs!news
  3. From: shang@corp.mot.com (David L. Shang)
  4. Subject: Re: What Should An Exception Handling Do? -- Clarification of rules
  5. Reply-To: shang@corp.mot.com
  6. Organization: MOTOROLA 
  7. Date: Mon, 1 Apr 1996 14:56:58 GMT
  8. Message-ID: <1996Apr1.145658.10876@schbbs.mot.com>
  9. References: <4jh84e$1b5@ratatosk.uio.no>
  10. Sender: news@schbbs.mot.com (SCHBBS News Account)
  11. Nntp-Posting-Host: 129.188.128.126
  12.  
  13. In article <4jh84e$1b5@ratatosk.uio.no> Jarle Stabell  
  14. <jarle.stabel@dokpro.uio.no> writes:
  15. > shang@corp.mot.com (David L. Shang) wrote:
  16. > > result    = try do_something()
  17. > >      {
  18. > >        when condition1: some_extraordinary_work1; retry;
  19. > >        when condition2: some_extraordinary_work2; retry;
  20. > >        when condition3: some_extraordinary_work3; retry;
  21. > >        when condition4: return null;
  22. > >      }
  23. > >
  24. > I think there's a problem with this "strategy", a user should be able to
  25. > cancel this kind of operation, here some_extraordinary_work1..3 don't
  26. > seem to give the user a chance to cancel the operation.
  27.  
  28. A return statement within some_extraordinary_work1..3 will cancel
  29. the operation, or a throw statement will kick the ball to a
  30. catcher outside.
  31.  
  32. David Shang
  33.